import request from '@/utils/request'

// 查询食堂列表
export function listCanteen(query) {
  return request({
    url: '/order/canteenManager/list',
    method: 'get',
    params: query
  })
}

// 查询食堂详细
export function getCanteen(id) {
  return request({
    url: '/order/canteenManager/' + id,
    method: 'get'
  })
}

// 新增食堂
export function addCanteen(data) {
  return request({
    url: '/order/canteenManager',
    method: 'post',
    data: data
  })
}

// 修改食堂
export function updateCanteen(data) {
  return request({
    url: '/order/canteenManager',
    method: 'put',
    data: data
  })
}

// 删除食堂
export function delCanteen(id) {
  return request({
    url: '/order/canteenManager/' + id,
    method: 'delete'
  })
}

// 修改食堂状态
export function changeStatus(id) {
  return request({
    url: '/order/canteenManager/enable/' + id,
    method: 'put',
  })
}

//获取二用餐地点维码
export function getQrCode(data) {
  return request({
    url: '/order/canteenManager/qrCode',
    method: 'get',
    params: data
  })
}



